home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / CIncludes / VideoServices.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  4.6 KB  |  181 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        VideoServices.h
  3.  
  4.      Contains:    Video Services Library Interfaces.
  5.  
  6.      Version:    Technology:    PowerSurge 1.0.2
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __VIDEOSERVICES__
  18. #define __VIDEOSERVICES__
  19.  
  20. #ifndef __MACTYPES__
  21. #include <MacTypes.h>
  22. #endif
  23. #ifndef __NAMEREGISTRY__
  24. #include <NameRegistry.h>
  25. #endif
  26. #ifndef __QUICKDRAW__
  27. #include <Quickdraw.h>
  28. #endif
  29.  
  30.  
  31.  
  32. #if PRAGMA_ONCE
  33. #pragma once
  34. #endif
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39.  
  40. #if PRAGMA_IMPORT
  41. #pragma import on
  42. #endif
  43.  
  44. #if PRAGMA_STRUCT_ALIGN
  45.     #pragma options align=mac68k
  46. #elif PRAGMA_STRUCT_PACKPUSH
  47.     #pragma pack(push, 2)
  48. #elif PRAGMA_STRUCT_PACK
  49.     #pragma pack(2)
  50. #endif
  51.  
  52.  
  53. enum {
  54.     kTransparentEncoding        = 0,
  55.     kInvertingEncoding            = 1
  56. };
  57.  
  58.  
  59. enum {
  60.     kTransparentEncodingShift    = (kTransparentEncoding << 1),
  61.     kTransparentEncodedPixel    = (0x01 << kTransparentEncodingShift),
  62.     kInvertingEncodingShift        = (kInvertingEncoding << 1),
  63.     kInvertingEncodedPixel        = (0x01 << kInvertingEncodingShift)
  64. };
  65.  
  66.  
  67.  
  68.  
  69.  
  70. enum {
  71.     kHardwareCursorDescriptorMajorVersion = 0x0001,
  72.     kHardwareCursorDescriptorMinorVersion = 0x0000
  73. };
  74.  
  75. typedef UInt32 *                        UInt32Ptr;
  76.  
  77. struct HardwareCursorDescriptorRec {
  78.     UInt16                             majorVersion;
  79.     UInt16                             minorVersion;
  80.     UInt32                             height;
  81.     UInt32                             width;
  82.     UInt32                             bitDepth;
  83.     UInt32                             maskBitDepth;
  84.     UInt32                             numColors;
  85.     UInt32Ptr                         colorEncodings;
  86.     UInt32                             flags;
  87.     UInt32                             supportedSpecialEncodings;
  88.     UInt32                             specialEncodings[16];
  89. };
  90. typedef struct HardwareCursorDescriptorRec HardwareCursorDescriptorRec;
  91.  
  92. typedef HardwareCursorDescriptorRec *    HardwareCursorDescriptorPtr;
  93.  
  94. enum {
  95.     kHardwareCursorInfoMajorVersion = 0x0001,
  96.     kHardwareCursorInfoMinorVersion = 0x0000
  97. };
  98.  
  99.  
  100. struct HardwareCursorInfoRec {
  101.     UInt16                             majorVersion;                /* Test tool should check for kHardwareCursorInfoMajorVersion1*/
  102.     UInt16                             minorVersion;                /* Test tool should check for kHardwareCursorInfoMinorVersion1*/
  103.     UInt32                             cursorHeight;
  104.     UInt32                             cursorWidth;
  105.     CTabPtr                         colorMap;                    /* nil or big enough for hardware's max colors*/
  106.     Ptr                             hardwareCursor;
  107.     UInt32                             reserved[6];                /* Test tool should check for 0s*/
  108. };
  109. typedef struct HardwareCursorInfoRec    HardwareCursorInfoRec;
  110.  
  111. typedef HardwareCursorInfoRec *            HardwareCursorInfoPtr;
  112.  
  113.  
  114. enum {
  115.     kVBLInterruptServiceType    = FOUR_CHAR_CODE('vbl '),
  116.     kHBLInterruptServiceType    = FOUR_CHAR_CODE('hbl '),
  117.     kFrameInterruptServiceType    = FOUR_CHAR_CODE('fram'),
  118.     kConnectInterruptServiceType = FOUR_CHAR_CODE('dci '),        /* Renamed -- Use kFBCheckInterruptServiceType*/
  119.     kFBConnectInterruptServiceType = kConnectInterruptServiceType, /* Demand to check configuration (Hardware unchanged)*/
  120.     kFBChangedInterruptServiceType = FOUR_CHAR_CODE('chng'),    /* Demand to rebuild (Hardware has reinitialized on dependent change)*/
  121.     kFBOfflineInterruptServiceType = FOUR_CHAR_CODE('remv'),    /* Demand to remove framebuffer (Hardware not available on dependent change -- but must not buserror)*/
  122.     kFBOnlineInterruptServiceType = FOUR_CHAR_CODE('add ')        /* Notice that hardware is available (after being removed)*/
  123. };
  124.  
  125.  
  126. enum {
  127.     kMaxDisplayConfigDataSize    = 64                            /* Max data size for VSLSetDisplayConfiguration*/
  128. };
  129.  
  130. typedef ResType                         InterruptServiceType;
  131. typedef UInt32                             InterruptServiceIDType;
  132. typedef InterruptServiceIDType *        InterruptServiceIDPtr;
  133. EXTERN_API_C( OSErr )
  134. VSLNewInterruptService            (RegEntryID *            serviceDevice,
  135.                                  InterruptServiceType     serviceType,
  136.                                  InterruptServiceIDPtr     serviceID);
  137.  
  138. EXTERN_API_C( OSErr )
  139. VSLWaitOnInterruptService        (InterruptServiceIDType  serviceID,
  140.                                  Duration                 timeout);
  141.  
  142. EXTERN_API_C( OSErr )
  143. VSLDisposeInterruptService        (InterruptServiceIDType  serviceID);
  144.  
  145. EXTERN_API_C( OSErr )
  146. VSLDoInterruptService            (InterruptServiceIDType  serviceID);
  147.  
  148. EXTERN_API_C( Boolean )
  149. VSLPrepareCursorForHardwareCursor (void *                cursorRef,
  150.                                  HardwareCursorDescriptorPtr  hardwareDescriptor,
  151.                                  HardwareCursorInfoPtr     hwCursorInfo);
  152.  
  153. EXTERN_API_C( OSErr )
  154. VSLSetDisplayConfiguration        (RegEntryID *            device,
  155.                                  RegPropertyName *        propertyName,
  156.                                  void *                    configData,
  157.                                  long                     configDataSize);
  158.  
  159.  
  160.  
  161. #if PRAGMA_STRUCT_ALIGN
  162.     #pragma options align=reset
  163. #elif PRAGMA_STRUCT_PACKPUSH
  164.     #pragma pack(pop)
  165. #elif PRAGMA_STRUCT_PACK
  166.     #pragma pack()
  167. #endif
  168.  
  169. #ifdef PRAGMA_IMPORT_OFF
  170. #pragma import off
  171. #elif PRAGMA_IMPORT
  172. #pragma import reset
  173. #endif
  174.  
  175. #ifdef __cplusplus
  176. }
  177. #endif
  178.  
  179. #endif /* __VIDEOSERVICES__ */
  180.  
  181.